﻿@using Domain.Entity
@using Pro260Website.Infrastructure
@model Pro260Website.Models.ListingViewModel<Domain.Entity.Game>


@{
    ViewBag.Title = Model.Title;
}

@* Do not use just yet *@

<div id="formBackground">
    <h1 class="title @Html.GetColor(Request.Cookies["color"])">@Model.Title</h1>
    <br/><br/><br/>

    @Html.ActionLink("View History", "ShowHistory");
    <div id="titlelessItem" style="float:right;">
        <div class = "item roundTextBox @Html.GetColor(Request.Cookies["color"])" style="right: 30px; bottom: 50px;">
        @using (Html.BeginForm("List", "Game"))
        {
            <input type="text" name="searchFor"/>
            <input type="submit" value="Search" class="actionButtons @Html.GetColor(Request.Cookies["color"])" />
        }
        </div>
    </div><br/>
    
    

    @foreach(var game in Model.Items)
    {
        Html.RenderPartial("GameSummary", game); <br/>
    }
    <div id="pagerForm" class="pager @Html.GetColor(Request.Cookies["color"])">
         @Html.PageLinks(Model.PagingInfo, i => Url.Action("GamesList", "Game", 
        new { searchFor = Model.QueryInfo.QueryString, page = i, pageSize = Model.PagingInfo.ItemsPerPage,
              type = Model.ViewTypeEnum,
              title = Model.Title,
              viewname = "GameList",
              area = ""
        }))
    </div>
</div>